package com.goodving.guli.bt.weight.family;

import android.app.Activity;
import android.app.Fragment;
import android.app.FragmentTransaction;
import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;

import com.goodving.guli.activity.UserListActivity;
import com.goodving.guli.activity.aa;

public class WeightChooseUserActivity extends Activity {
    private UserListActivity f11458a;
    private boolean f11459b;

    public WeightChooseUserActivity() {
        this.f11459b = false;
    }

    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        requestWindowFeature(1);
        Intent intent = getIntent();
        Bundle bundle2 = null;
        if (intent != null) {
            bundle2 = intent.getExtras();
        }
        this.f11458a = (UserListActivity) Fragment.instantiate(this, UserListActivity.class.getName(), bundle2);
        this.f11459b = true;
        this.f11458a.m15620a(new C2027l(this));
        FragmentTransaction beginTransaction = getFragmentManager().beginTransaction();
        beginTransaction.replace(16908290, this.f11458a);
        beginTransaction.commit();
    }

    class C2027l implements aa {
        final /* synthetic */ WeightChooseUserActivity f11502a;

        C2027l(WeightChooseUserActivity weightChooseUserActivity) {
            this.f11502a = weightChooseUserActivity;
        }

        public void m15724a() {
            this.f11502a.f11459b = false;
            this.f11502a.finish();
        }
    }

    public boolean onKeyDown(int i, KeyEvent keyEvent) {
        if (this.f11459b && keyEvent.getAction() == 0) {
            switch (i) {
                case 4 /*4*/:
                    this.f11458a.onCancel(null);
                    return true;
            }
        }
        return super.onKeyDown(i, keyEvent);
    }
}
